﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FileHelpers
{
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
    public sealed class FieldNameAttribute : Attribute
    {
        private string _columnName;

        public string ColumnName
        {
            get { return _columnName; }
        }

        public FieldNameAttribute(string columnName)
		{
            if (!string.IsNullOrEmpty(columnName))
                this._columnName = columnName;
			else
                throw new BadUsageException("The colunm name can not be null or empty");
		}
    }
}
